﻿using PetaPoco;
using PmSoft;
using PmSoft.Caching;
using System.ComponentModel;
using static Modules.Person.PersonConstants;

namespace Modules.Person;

/// <summary>
/// 人员银行卡信息
///</summary>
[TableName("person_bank")]
[Description("人员银行卡信息")]
[PrimaryKey("id", AutoIncrement = true)]
[CacheSetting(true,PropertyNamesOfArea = "IdCard")]
[Serializable]
public class PersonBank : IEntity
{
    /// <summary>
    /// 主键
    ///</summary>
    [PetaPoco.Column("id")]
    public int Id { get; set; }

    /// <summary>
    /// 人员身份证
    ///</summary>
    [PetaPoco.Column("idcard")]
    public string IdCard { get; set; }

    /// <summary>
    /// 发放工资银行卡号
    ///</summary>
    [PetaPoco.Column("card_no")]
    public string? CardNo { get; set; }

    /// <summary>
    /// 工资卡类型
    /// </summary>
    [PetaPoco.Column("type")]
    public 工资卡类型 Type { get; set; }

    /// <summary>
    /// 发放工资银行名称
    ///</summary>
    [PetaPoco.Column("bank_name")]
    public string BankName { get; set; }

    /// <summary>
    /// 发放工资卡银行联号
    ///</summary>
    [PetaPoco.Column("bank_link_no")]
    public string? BankLinkNo { get; set; }

    /// <summary>
    /// 发放工资卡银行 参考银行代码字典表
    ///</summary>
    [PetaPoco.Column("bank_code")]
    public string? BankCode { get; set; }

    /// <summary>
    /// 银行地址
    ///</summary>
    [PetaPoco.Column("bank_address")]
    public string? BankAddress { get; set; }

    /// <summary>
    /// 创建时间
    ///</summary>
    [PetaPoco.Column("create_time")]
    public DateTime CreateTime { get; set; }

    #region IEntity 成员

    [Ignore]
    object IEntity.EntityId { get { return this.Id; } }

    #endregion IEntity 成员
}